package org.grayrabbit.cms.entity;

// Generated 2011-5-16 13:39:30 by Hibernate Tools 3.3.0.GA

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 * CmsOperCode generated by hbm2java
 */
@Entity
@Table(name = "CMS_OPER_CODE")
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class OperCode implements java.io.Serializable {

	private static final long serialVersionUID = 8060096218194480402L;
	private String operId;
	private String operCode;
	private String operName;
	private String operType;
	private Set<RoleOperRela> roleOperRelas = new HashSet<RoleOperRela>(
			0);
	private Set<AdminOperRela> adminOperRelas = new HashSet<AdminOperRela>(
			0);

	public OperCode() {
	}

	public OperCode(String operId) {
		this.operId = operId;
	}

	@Id
	@Column(name = "OPER_ID", unique = true, nullable = false, length = 32)
	@GeneratedValue(generator = "paymentableGenerator")       
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid") 
	public String getOperId() {
		return this.operId;
	}

	public void setOperId(String operId) {
		this.operId = operId;
	}

	@Column(name = "OPER_CODE", length = 64)
	public String getOperCode() {
		return this.operCode;
	}

	public void setOperCode(String operCode) {
		this.operCode = operCode;
	}

	@Column(name = "OPER_NAME", length = 64)
	public String getOperName() {
		return this.operName;
	}

	public void setOperName(String operName) {
		this.operName = operName;
	}

	@Column(name = "OPER_TYPE", length = 32)
	public String getOperType() {
		return this.operType;
	}

	public void setOperType(String operType) {
		this.operType = operType;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "operCode")
	public Set<RoleOperRela> getRoleOperRelas() {
		return this.roleOperRelas;
	}

	public void setRoleOperRelas(Set<RoleOperRela> roleOperRelas) {
		this.roleOperRelas = roleOperRelas;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "operCode")
	public Set<AdminOperRela> getAdminOperRelas() {
		return this.adminOperRelas;
	}

	public void setAdminOperRelas(Set<AdminOperRela> adminOperRelas) {
		this.adminOperRelas = adminOperRelas;
	}

}
